package com.vodone.v1pin.help.service
{
	import com.vodone.v1pin.ServiceProvider;
	import com.vodone.v1pin.core.service.HttpJsonDelegate;
	
	import mx.rpc.http.mxml.HTTPService;
	
	public class HelpDelegate
	{
		public static function getNavigation( resultHandler:Function , faultHandler:Function = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getHelpService;
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( {} , resultHandler , faultHandler );
		}
		public static function getContent( resultHandler:Function , id:String , faultHandler:Function = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getHelpContentService;
			var params:Object = {
				helpid : id
			}
			
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler );
		}
		
		public static function getRegistHelpContent( resultHandler:Function , faultHandler:Function = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getHelpContentService;
			var params:Object = {
				type : "article"
			}
			
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler );
		}
		
		public static function sendMessage( resultHandler:Function , msg:String , id:String , faultHandler:Function = null):void
		{
			var service:HTTPService = ServiceProvider.getInstance().sendFeedbackService;
			var params:Object = {
				userID : id,
				message : msg
			}
			
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler );
		}
	}
}